﻿<head >
    <title>修改密码</title>
    <meta charset="UTF-8"/>
    <link href="../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../Scripts/QueryString.js" type="text/javascript"></script>
    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="../Scripts/config.js"></script>
    <script type="text/javascript" src="../Comm/Gener.js"></script>
    <script type="text/javascript" language="javascript" >
        function ChangeDept_Submit() {

            //执行登录..
            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=ChangePassword_Init&DeptNo=" + deptNo + "&m=" + Math.random(),
                dataType: 'html',
                success: function (data) {
                    if (data.indexOf('err@') == 0) {
                        $("#Msg").html("<font color=red>" + data + "</font>");
                        return;
                    }
                }
            });
        }

        function Submint() {

            var val1 = document.getElementById('TB_Pass1').value;
            var val2 = document.getElementById('TB_Pass2').value;
            var oldPass = document.getElementById('TB_PassOld').value;


            if (val1 != val2) {
                alert('err@两次密码不一致.');
                return;
            }

            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=ChangePassword_Submit&OldPass=" + oldPass + "&Pass=" + val1 + "&m=" + Math.random(),
                dataType: 'html',
                success: function (data) {
                    if (data.indexOf('err@') == 0) {
                        $("#Msg").html("<font color=red>" + data + "</font>");
                        return;
                    }
                    alert(data);
                    window.location.href = window.location.href;
                }
            });
        }
    </script>
    <style type="text/css">
    table
    {
       border:0px;
       margin-left:30px;
    }
    td
    {
       border:0px;
    }
    li
    {
       font-size:medium;
       cursor:pointer;
    }
    </style>
</head>
<body>
    <form id="cc" >

    <br />
    <br />
    <br />
   <center>

   <fieldset style="width:30%;text-align:left; float:center; margin:50px; width:500px; padding:50px;"  >
    <legend> 修改密码 </legend>

<br />
    <table style="width:100%;">
    <tr>
    <td>旧密码</td>
    <td><input type="password"  id="TB_PassOld" name="TB_PassOld" /> </td>
    </tr>

    <tr>
    <td>新密码</td>
    <td><input type="password"  id="TB_Pass1" name="TB_Pass1" /> </td>
    </tr>

     <tr>
    <td>重复输入一次</td>
    <td><input type="password"  id="TB_Pass2" name="TB_Pass" /> </td>
    </tr>

       <tr>
    <td></td>
    <td><input  type="button" value="修改密码"  onclick="Submint()" /> </td>
    </tr>

    </table>

    

    <div id="Msg"  style="margin:50px;"   />
    </fieldset>
     </center>

    </form>
</body>
</html>
